import store from '@/store'
import popup from '@/views/login/popup.js'
export const toLogin = callback => {
  let hasLogin = store.getters['user/isLogin']
  if (hasLogin) {
    callback()
  } else {
    popup.install({
      currentTab: store.getters['projectSetting/getGlobLoginRouteName'],
      visible: true
    })
  }
}
